//难度选择类
package com.alatus;
import java.awt.*;
import com.alatus.utils.GameUtil;

public class GameSelect  {
    //判断是否点击到难度
    boolean hard(){
        if(GameUtil.MOUSE_X>100&&GameUtil.MOUSE_X<400){
            if(GameUtil.MOUSE_Y>50&&GameUtil.MOUSE_Y<150){
                GameUtil.level=1;
                GameUtil.state=0;
                return true;
            }
            if(GameUtil.MOUSE_Y>200&&GameUtil.MOUSE_Y<300){
                GameUtil.level=2;
                GameUtil.state=0;
                return true;
            }
            if(GameUtil.MOUSE_Y>350&&GameUtil.MOUSE_Y<450){
                GameUtil.level=3;
                GameUtil.state=0;
                return true;
            }
        }
        return false;
    }

    void paintSelf(Graphics g){
        g.setColor(Color.BLACK);
        g.drawRoundRect(100,50,300,100,40,40);
        g.setColor(Color.GRAY);
        g.fillRoundRect(100,50,300,100,40,40);
        GameUtil.drawWord(g,"入门",185,110,30,Color.black);

        g.drawRoundRect(100,200,300,100,40,40);
        g.setColor(Color.CYAN);
        g.fillRoundRect(100,200,300,100,40,40);
        GameUtil.drawWord(g,"挑战",185,260,30,Color.black);

        g.drawRoundRect(100,350,300,100,40,40);
        g.setColor(Color.PINK);
        g.fillRoundRect(100,350,300,100,40,40);
        GameUtil.drawWord(g,"传说",185,410,30,Color.black);
    }

    void hard(int level){
        switch (level){
            case 1:
                GameUtil.MINE_MAX = 10;
                GameUtil.MAP_WIDTH = 9;
                GameUtil.MAP_HEIGHT = 9;
                break;
            case 2:
                GameUtil.MINE_MAX = 25;
                GameUtil.MAP_WIDTH = 14;
                GameUtil.MAP_HEIGHT = 14;
                break;
            case 3:
                GameUtil.MINE_MAX = 45;
                GameUtil.MAP_WIDTH = 20;
                GameUtil.MAP_HEIGHT = 14;
                break;
            default:
        }
    }
}

